Skip to content

Conversation

@Sayan4444
Copy link
Contributor

Proposed changes (including videos or screenshots)

CHANGES MADE

  1. Ability to navigate to create database and change workspace modals from create page modal

Issue(s)

This should close issues :-
fix #12

Steps to test or reproduce

2024-01-29.19-29-21.mp4

NOT IMPLEMENTED

-->after the workspace has been changed Open the Create Database Modal Again, By Default

I need further guidance to implement this feature

@Nabhag8848
Copy link
Collaborator

@Sayan4444 were you able to implement: changed to Create Page or Database Modal Again once you change workspace from it?

@Sayan4444
Copy link
Contributor Author

Sayan4444 commented Feb 7, 2024

@Nabhag8848 Not yet but almost to it. Will be raising a PR very soon. Spent the last few days understanding how apps-engine works so that I can tackle any future problems

@Spiral-Memory
Copy link
Contributor

Hey @Sayan4444 , since you've been working on this for some time, specifically going back to the modal once the workspace is changed, the same feature needs to be implemented for Create Database modal also as in PR #48. Can we collaborate on this? I'm also interested in hearing your observations and thoughts on how this can be done, given your efforts to solve it for a while.

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory sure....I will be telling you the details by night

@Spiral-Memory
Copy link
Contributor

Spiral-Memory commented Feb 7, 2024

Hey @Sayan4444 , I have tried to pass states to achieve the desired behaviour and have tried solving it and its working also, the problem is after the modal opens, it closes abruptly within a second, looks like this is a default behavior of Submit button. Have you figured out a way ? If yes, please let me know. Also go through my PR #48, i have attached a video, once see and let me know if there is a way to fix it.

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory can you tell me how can u passing the states? Moreover how can u opening the modal on save?....I have also managed to pass the state but its not opening themmodal....you can also push your code in this or another branch

@Spiral-Memory
Copy link
Contributor

Use the same approach as in ExecuteActionBlockHandler

Create a handler object using new Handler after importing the handler.

Then, use await handler.xyz().

Sure, I will push it tomorrow.

@Spiral-Memory
Copy link
Contributor

Spiral-Memory commented Feb 7, 2024

Even after that, there will still be issues; it seems like the submit button has some default behavior. It's just my assumption, but that is the most probable reason, in my opinion, for why it is unable to hold the modal and closes within a second.

Check the video i uploaded.

@Sayan4444
Copy link
Contributor Author

Actually @Spiral-Memory I have worked for the "Cancel" button redirection. When we create a instance of handler it need things like "room","triggeredId" which is absent in ExecuteCloseButton. Even if u pass it via Modal Storage from ExecuteActionBlockHandler, it wont work for some reason

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory how about we have a voice call somehow, any time free after 6pm today?

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory do tell me when you are free

@Spiral-Memory
Copy link
Contributor

Yaa sure, I have a presentation tomorrow, Let's do it a day after tomorrow. Connect me through LinkedIn, So that we don't have to spam here.

LinkedIn Id: https://www.linkedin.com/in/zishanahmad72/

@Sayan4444
Copy link
Contributor Author

https://youtu.be/9o4Nx7Ho_hA

@Nabhag8848 I have been able to change state, but it closes automatically(modal shows as long as handler.createNotionPageOrRecord). I cant find out why! maybe its the default behavior of "Submit" button or something is getting cleared, making the modal close. If you want I can push the commit till the progress I have been able to make.
Debugging tried:- removed everything that clears any state but still same behavior

@Spiral-Memory
Copy link
Contributor

https://youtu.be/9o4Nx7Ho_hA

@Nabhag8848 I have been able to change state, but it closes automatically(modal shows as long as handler.createNotionPageOrRecord). I cant find out why! maybe its the default behavior of "Submit" button or something is getting cleared, making the modal close. If you want I can push the commit till the progress I have been able to make.
Debugging tried:- removed everything that clears any state but still same behavior

Exactly, i am facing the same issue.. i also have a feeling that it is the default behaviour of the Submit button to clear everything at the end. I went through the Rc Engine repo to understand if anything can be done. There are some props it takes, notifyOnClose or canClose kind of parameters but i am unable to figure out what exactly it does.

@Spiral-Memory
Copy link
Contributor

If you make any progress or figure out the way, let me know. I am also trying my best to figure out how it can be done.

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory if you have time try out these two things

  1. Since there are a lot of repos in using apps engine...try to setup and see its working
  2. Setup a apps-engine project from scratch and replicate the issue and try to solve it
    I have my exams soon and having very less time.....aap thora explore kijie and do keep me updated

@Spiral-Memory
Copy link
Contributor

Yep, I am exploring other RC repos to see if anywhere it is implemented. By the way 😂, I am also having exams only. We are in the same stage.

@Sayan4444
Copy link
Contributor Author

@Spiral-Memory any update regarding this issue?

@Spiral-Memory
Copy link
Contributor

No, bro, currently busy with midterms; will soon look into it again.

@Nabhag8848 Nabhag8848 added the enhancement New feature or request label Feb 29, 2024
@Nabhag8848
Copy link
Collaborator

@Sayan4444 Can you solve the conflicts and rebase your PR, this happened as i just merged @Spiral-Memory PR?

@Sayan4444
Copy link
Contributor Author

@Nabhag8848 I have resolved all the merge conflicts

@Nabhag8848
Copy link
Collaborator

Nabhag8848 commented Feb 29, 2024

@Nabhag8848 I have resolved all the merge conflicts

@Sayan4444 there are override changes, no code should get removed or commented and it should include all the latest code you had.

  • maybe Checkout some blogs on Rebase and Solving Conflicts.

@Spiral-Memory
Copy link
Contributor

Spiral-Memory commented Feb 29, 2024

@Nabhag8848 , I think he have merged it correctly, its just that's after rebasing, he also changed his code since he was using duplicate variable for same thing, so he removed it and added that change also along with rebasing in this commit itself.

@Nabhag8848
Copy link
Collaborator

@Nabhag8848 , I think he have rebased it correctly, its just that's after rebasing, he also changed his code since he was using duplicate variable for same thing, so he removed it and added that change also along with rebasing in this commit itself.

Yep. @Sayan4444 revert back your change. and again rebase and solve the conflicts properly.

Starting point would be to git reflog

@Nabhag8848
Copy link
Collaborator

@Nabhag8848 , I think he have rebased it correctly, its just that's after rebasing, he also changed his code since he was using duplicate variable for same thing, so he removed it and added that change also along with rebasing in this commit itself.

Yep. @Sayan4444 revert back your change. and again rebase and solve the conflicts properly.

Starting point would be to git reflog

@Sayan4444 let us know if need any help around doing that.

  • Just revert your last commit - merge conflicts commit. Solve the merge conflict again carefully and push the changes again.

@Sayan4444
Copy link
Contributor Author

Sayan4444 commented Mar 1, 2024

Sure @Nabhag8848 . Had a very busy day will sit at night and complete it today only

@Sayan4444
Copy link
Contributor Author

Hi @Nabhag8848 , can you check if I did correct this time?

@Nabhag8848 Nabhag8848 self-requested a review March 1, 2024 18:34
Copy link
Collaborator

@Nabhag8848 Nabhag8848 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Sayan4444 Added few comments, lemme know once you done, also please check once entirely and make sure everything works fine and nothing is breaking in this case.

@Spiral-Memory
Copy link
Contributor

Spiral-Memory commented Mar 1, 2024

@Sayan4444 , there are three cases in which you could test if everything is working fine:

  1. From the Create Page or Record Modal, it should navigate to Create Database and Change Workspace.

  2. From the Create Database Modal, it should perform both actions as well.

  3. In the Create Page or Record Modal, select a database in the select box; it will update the modal. There must be three overflow lists: Change Database, Create Database, and Change Workspace (ensure they appear in this order or the order which Nabhag bhaiya specified).

Also, for your help, I have sent you a zip file on LinkedIn in which I have rebased and made the changes to make everything work. You can review that too if you need any help. If you need any help, please let me know

@Sayan4444
Copy link
Contributor Author

@Nabhag8848 bhaiya I have resolved all the requested changes

@Sayan4444
Copy link
Contributor Author

@Sayan4444 Sayan4444 requested a review from Nabhag8848 March 1, 2024 20:56
Copy link
Collaborator

@Nabhag8848 Nabhag8848 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ! 🔥 @Sayan4444

@Nabhag8848 Nabhag8848 changed the title [Feat] Add Change Workspace Option in Overflow Menu within Create Pag… [Feat] Adds Change Workspace Menu in Create Page or Record Modal Mar 3, 2024
@Nabhag8848 Nabhag8848 merged commit 8da0cc6 into RocketChat:main Mar 3, 2024
@Sayan4444 Sayan4444 deleted the change-workspace branch March 10, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

[Feat] Add Change Workspace Option in Overflow Menu within Create Page or Record Modal

3 participants